class Counter{
    private static int ret2;
    public int ret;
    public void increase1() {
        synchronized (this) {
            ret++;
        }
    }
    synchronized public void increase2() {
        ret++;
    }

    public static void increase3() {
        synchronized (Counter.class) {
            ret2++;
        }
    }
    synchronized public static void increase4() {
        ret2++;
    }
}
public class Demo8 {
    Thread thread = new Thread(() ->{

    });
}
